package com.jxc.service.admin.impl;

import com.jxc.dao.admin.ProductDao;
import com.jxc.entity.admin.Product;
import com.jxc.service.admin.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Description:
 */
@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private ProductDao productDao;

    @Override
    public int add(Product product) {
        return productDao.add(product);
    }

    @Override
    public Integer getTotal(Map map) {
        return productDao.getTotal(map);
    }

    @Override
    public List<Product> getList(Map map) {
        return productDao.findList(map);
    }

    @Override
    public int deleteByIds(String ids) {
        return productDao.delete(ids);
    }

    @Override
    public int edit(Product product) {
        return productDao.edit(product);
    }

    @Override
    public Product getProductBySupplierId(String id) {
        return productDao.getProductBySupplierId(id);
    }
}
